import { service } from '@/api/request.js'

export const login = (data) => {
  return service({
    url: '/admin_login/login',
    method: 'post',
    data,
  })
}

export const getInfo = (token) => {
  return service({
    url: '/admin/admin_info',
    method: 'get',
    params: { token },
  })
}

export const logout = () => {
  return service({
    url: '/admin_login/logout',
    method: 'get',
  })
}

export const changePassword = (data) => {
  return service({
    url: '/admin/change_pwd',
    method: 'post',
    data,
  })
}
